import post2Portal from 'src/api/common'

export const getClassList = (data) => {
  let params = {
    api: '/sys/product/categoryList',
    methods: 'GET',
    data: data
  }
  return post2Portal(params);
};

export const addClass = (data) => {
  let params = {
    api: '/sys/product/addCategory',
    methods: 'POST',
    data: data,
    headers: {
      'sub-form': true
    }
  }
  return post2Portal(params);
};

export const removeClass = (data) => {
  let params = {
    api: '/sys/product/batch/removeCatetory',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const updateClass = (data) => {
  let params = {
    api: '/sys/product/updateCategory',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};


export const getlotteryClassList = (data) => {
  let params = {
    api: '/sys/lottery/categoryList',
    methods: 'GET',
    data: data
  }
  return post2Portal(params);
};

export const addlotteryClass = (data) => {
  let params = {
    api: '/sys/lottery/addCategory',
    methods: 'POST',
    data: data,
    headers: {
      'sub-form': true
    }
  }
  return post2Portal(params);
};

export const removelotteryClass = (data) => {
  let params = {
    api: '/sys/lottery/batch/removeCatetory',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const updatelotteryClass = (data) => {
  let params = {
    api: '/sys/lottery/updateCategory',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};
